package com.ccb.jyzx.expand.tiantouonline.service.impl;

import com.ccb.jyzx.expand.tiantouonline.bean.FileInfo;
import com.ccb.jyzx.expand.tiantouonline.dao.FileInfoDao;
import com.ccb.jyzx.expand.tiantouonline.service.FileInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author XIEFEI
 * @date 2019-11-19 9:52
 * @Description
 **/
@Service
public class FileInfoServiceImpl implements FileInfoService {

    @Autowired
    FileInfoDao fileInfoDao;

    @Override
    public void save(FileInfo fileInfo) {
        fileInfoDao.save(fileInfo);
    }

    @Override
    public FileInfo getById(String fileId) {
        return fileInfoDao.getById(fileId);
    }

    @Override
    public void updateUploadTime(String fileId, Long formateTime) {
        fileInfoDao.updateUploadTime(fileId,formateTime);
    }

    @Override
    public void updateUpTag(String fileId, int i) {
        fileInfoDao.updateUpTag(fileId,i);
    }

    @Override
    public List<FileInfo> findByTimeTop(Long topTime, Long limitNum) {
        return fileInfoDao.findByTimeTop(topTime,limitNum);
    }

    @Override
    public void clearById(String id) {
        fileInfoDao.clearById(id);
    }

    @Override
    public List<FileInfo> findFileinfoUnUnion(){
        return fileInfoDao.findFileinfoUnUnion();
    }

    @Override
    public void updateUpMerged(String fileId,int i){
        fileInfoDao.updateUpMerged(fileId,i);
    }
}
